import {
    Web, Login, NotFound, System, User, Equman, Equtype, Equscrap, Admin, Role, Individual, 
    Booked, Bookedrecord, Borrows, Borrecord, Bormanage, Borrecords, Boomanage, Boorecord,
    team, committee, personnel, flow, fixed, projects, finding, platform, topic, visit, download,
    rules,dynamics
}
from "@/pages";
import {
    UserOutlined,
    // SettingOutlined,
    HomeOutlined,
    OneToOneOutlined,                                   
    ProfileOutlined,
    SendOutlined,
    FormOutlined,
    AuditOutlined,
    CloseSquareOutlined,
    FileTextOutlined,
    ContainerOutlined
} from "@ant-design/icons";
//将antd的图表引入
import MyIcon from '../components/MyIcon'
const commonRoutes = [
    {
        pathName: '/login',
        component: Login
    },    
    {
        pathName: '/web',
        component: Web
    },
    {
        pathName: '/overview',
        component: Web,
    },
    {
        pathName: '/academicteam',
        component: Web,
    },
    {
        pathName: '/construction',
        component: Web,
    },
    {
        pathName: '/researchplatform',
        component: Web,
    },
    {
        pathName: '/opencommunication',
        component: Web,
    },
    {
        pathName: '/datadownload',
        component: Web,
    },
    {
        pathName: '/informationcenter',
        component: Web,
    },
    {
        pathName: '/404',
        component: NotFound
    }

]

const privateRoutes = [
    {
        pathName: '/admin/admin',
        component: Admin,
        name: "首页",
        icon: <HomeOutlined/>,
        isFirst: true,
        id: 1,
    },
    {
        pathName: '/admin/user',
        name: "用户管理",
        icon: <UserOutlined/>,
        component: null,
        isFirst: true,
        id: 2,
        children: [
            {
                pathName: '/admin/user/user',
                name: "用户管理",
                icon: <UserOutlined />,
                component: User
            },
            {
                pathName: '/admin/user/role',
                name: "角色管理",
                icon: <MyIcon type={'icon-jiaoseguanli'} />,
                component: Role
            },
        ]
    },
    {
        pathName: '/admin/equipment',
        name: "设备管理",
        icon: <OneToOneOutlined />,  
        component: null,
        isFirst: true,
        id: 3,
        children: [
            {
                pathName: '/admin/equipment/equclass',
                name: "设备种类管理",
                icon: <OneToOneOutlined />,
                component: Equtype   
            },
            {
                pathName: '/admin/equipment/equ',
                name: "设备详情管理",
                icon: <ProfileOutlined/>,
                component: Equman   
            },
            {
                pathName: '/admin/equipment/scrap',
                name: "报废设备管理",
                icon: <CloseSquareOutlined />,
                component: Equscrap   
            },
        ]
    },
    {
        pathName: '/admin/borrow',
        name: "设备借用",
        component: null,
        icon: < SendOutlined />,
        isFirst: true,
        id: 4,
        children: [
            {
                pathName: '/admin/borrow/borrows',
                name: "设备借用",
                icon: < SendOutlined />,
                component: Borrows   
            },
            {
                pathName: '/admin/borrow/borrecord',
                name: "设备借用记录",
                icon: <FileTextOutlined />,
                component: Borrecord    
            },
        ]
    },
    {
        pathName: '/admin/bormanage',
        name: "设备借用管理",
        component: null,
        icon: <ContainerOutlined />,
        isFirst: true,
        id: 5,
        children: [
            {
                pathName: '/admin/bormanage/bromanage',
                name: "设备借用管理",
                icon:<ContainerOutlined />,
                component: Bormanage   
            },
            {
                pathName: '/admin/bormanage/borrecords',
                name: "设备借用记录",
                icon: <FileTextOutlined />,
                component: Borrecords   
            },
        ]
    },
    {
        pathName: '/admin/lab',
        name: "实验室管理",
        icon: <FormOutlined />,
        component: null,
        isFirst: true,
        id: 6,
        children: [
            {
                pathName: '/admin/lab/overview',
                name: "实验室概况",
                component: null,
                icon:<ContainerOutlined />,
             children: [
                    {
                        pathName: '/admin/lab/overview/team',
                        name: "实验室团队",
                        icon: <ContainerOutlined />,
                        component: team,
                    },
                    {
                        pathName: '/admin/lab/overview/committee',
                        name: "学术委员会",
                        icon: <ContainerOutlined />,
                        component: committee,
                    },
                    {
                        pathName: '/admin/lab/overview/personnel',
                        name: "实验室人员",
                        icon: <ContainerOutlined />,
                        component: personnel,
                    },
                ] 
            },
            {
                pathName: '/admin/lab/academicteam',
                name: "学术队伍",
                icon: <FileTextOutlined />,
                component: null,
                children: [
                    {
                        pathName: '/admin/lab/academicteam/fixed',
                        name: "固定人员",
                        icon: <ContainerOutlined />,
                        component: fixed,
                    },
                    {
                        pathName: '/admin/lab/academicteam/flow',
                        name: "流动人员",
                        icon: <ContainerOutlined />,
                        component:flow,
                    },
                    
                ]
            },
            {
                pathName: '/admin/lab/construction',
                name: "实验室建设",
                icon: <FileTextOutlined />,
                component: null,
                children: [
                    {
                        pathName: '/admin/lab/construction/projects',
                        name: "科研项目",
                        icon: <ContainerOutlined />,
                        component: projects,
                    },
                    {
                        pathName: '/admin/lab/construction/finding',
                        name: "研究成果",
                        icon: <ContainerOutlined />,
                        component:finding,
                    },
                    
                ]
            },
            {
                pathName: '/admin/lab/platform',
                name: "科研平台",
                icon: <FileTextOutlined />,
                component: platform  
            },
            {
                pathName: '/admin/lab/communication',
                name: "开放交流",
                icon: <FileTextOutlined />,
                component: null,
                children: [
                    {
                        pathName: '/admin/lab/communication/visit',
                        name: "实验室参观",
                        icon: <ContainerOutlined />,
                        component: visit,
                    },
                    {
                        pathName: '/admin/lab/communication/topic',
                        name: "开放课题",
                        icon: <ContainerOutlined />,
                        component:topic,
                    },
                ]
            },
            {
                pathName: '/admin/lab/download',
                name: "资料下载",
                icon: <FileTextOutlined />,
                component: download  
            },
            {
                pathName: '/admin/lab/information',
                name: "信息中心",
                icon: <FileTextOutlined />,
                component: null,
                children: [
                    {
                        pathName: '/admin/lab/information/dynamics',
                        name: "实验室动态",
                        icon: <ContainerOutlined />,
                        component: dynamics,
                    },
                    {
                        pathName: '/admin/lab/information/rules',
                        name: "规章制度",
                        icon: <ContainerOutlined />,
                        component:rules,
                    },
                ]  
            },
        ]
    },
    {
        pathName: '/admin/booked',
        component: null,
        name: "实验室预约",
        icon: <ProfileOutlined />,
        isFirst: true,
        id: 7,
        children: [
            {
                pathName: '/admin/booked/booked',
                name: "实验室预约",
                icon:<ProfileOutlined />,
                component: Booked
            },
            {
                pathName: '/admin/booked/bookedrecord',
                name: "预约记录",
                icon: <FileTextOutlined />,
                component: Bookedrecord  
            },
        ]
    },
    {
        pathName: '/admin/boomanage',
        component: null,
        name: "实验室预约管理",
        icon: <AuditOutlined />,
        isFirst: true,
        id: 8,
        children: [
            {
                pathName: '/admin/boomanage/boomanage',
                name: "预约发布",
                icon:<FileTextOutlined />,
                component: Boomanage
            },
            {
                pathName: '/admin/boomanage/bootecord',
                name: "预约审批",
                icon: <AuditOutlined />,
                component: Boorecord
            },
        ]
    },
    // {
    //     pathName: '/admin/system',
    //     component: System,
    //     name: "系统管理",
    //     icon: <SettingOutlined/>,
    //     isFirst: true,
    //     id: 10,
    // },
]

const hideRoutes = [
    {
        pathName: '/admin/individual',
        component: Individual,
    },
]

export {
    commonRoutes,
    privateRoutes,
    hideRoutes
}
